package priv.lirenhe.dissertation.component.search_engine.search_index;

import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.Query;
import org.apache.lucene.util.Version;

import com.chenlb.mmseg4j.analysis.MMSegAnalyzer;

public class Queryer {
	
	public static Query getQuery(String queryStr){  
//		new MMSegAnalyzer("F:\\workspace\\java_workspace_01\\search_engine_1_urlqueue\\dics\\data")
		QueryParser queryParser = new QueryParser(Version.LUCENE_35,"webPageContentText",new MMSegAnalyzer());
		Query query = null;
		
		try {
			query = queryParser.parse(queryStr);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		
		return query;
	}

}
